import React from 'react';
import { BrowserRouter as Router } from 'react-router-dom'
import { Route, Switch, NavLink, Link } from 'react-router-dom'
import IndexPage from './pages/index'
import LoginPage from './pages/login'

import CoursePage from './pages/sub/Course'
import RecomCoursePage from './pages/sub/RecomCourse'
import SliderPage from './pages/sub/Slider'
import CollectionPage from './pages/sub/Collection'
import TeacherPage from './pages/sub/Teacher'
import StudentPage from './pages/sub/Student'
import CrawlerPage from './pages/sub/Crawler'



function App() {
  return (
    <Router>
      <Switch>
        <Route component={LoginPage} path="/login"></Route>
        <Route  path="/" render={ props =>(
          <IndexPage history={props.history}>
            <Switch>
            <Route component={ CoursePage } path="/course"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            <Route component={RecomCoursePage} path="/RecomCourse"></Route>
            </Switch>
          </IndexPage>
        )}/>
      </Switch>
    </Router>
  );
}

export default App;
